package ca.camosun.practice;

import android.os.Bundle;
import android.app.Activity;
import android.view.Menu;
import android.widget.RatingBar;
import android.widget.RatingBar.OnRatingBarChangeListener;
import android.widget.TextView;
//This may or may not be a comment.
public class MainActivity extends Activity {
	private RatingBar ratingBar;
	private TextView ratingScore;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);    
        wallabies();
        
        // Andre comment
        ratingBar = (RatingBar) findViewById(R.id.ratingBar1);
        ratingScore = (TextView) findViewById(R.id.ratingScore);

        ratingBar.setOnRatingBarChangeListener(new OnRatingBarChangeListener() {
          	public void onRatingChanged(RatingBar ratingBar, float rating, boolean fromUser) {
           		ratingScore.setText(String.valueOf(rating));
           	}
        });
    }
    
    
    public void wallabies() {
    	int x = 2;
    	
    	while (x < 17) {
    		x = x + 30;
    		x = x - 29;
    	}
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        getMenuInflater().inflate(R.menu.activity_main, menu);
        return true;
    
    }

}



